cars = ['奥迪', '宝马', '奔驰', '大众']
for car in cars:
    if car == "奥迪":
        print('Audi')
    else:
        print(car)
age_1 = 18
age_2 = 22
result = age_1 >= 21 and age_2 >= 21
print(result)
result = age_1 >= 21 or age_2 >= 21
print(result)
# 检查某个元素是否包含在列表中
result = "奥迪" in cars
print(result)
result = "sd" in cars
print(result)
# 检查某个元素是否不包含在列表中
result = "奥迪" not in cars
print(result)

can_edit = True
print(can_edit)

age = 70
if age < 4:
    price = 0
elif age < 18:
    price = 25
elif age < 64:
    price = 40
else:
    price = 20
print(price)

available_toppings = ['葱', '香菜', '食用盐', '花椒油']
requested_toppings = ['食用盐', "香菜", "花椒"]

for requested in requested_toppings:
    if requested in available_toppings:
        print(f"添加{requested}")
    else:
        print(f"抱歉，没有{requested}")

# 练习
# 1、创建一个至少包含5个用户名的列表，
# 且其中一个用户名为'admin' 。想象你要编写代码，在每位用户登录网站后都
# 打印一条问候消息。遍历用户名列表，并向每位用户打印一条问候消息

users = ['admin', 'user_1', "user_2", "user_3"]
for user in users:
    if user == "admin":
        print(f"Hello {user},would you like to see a status report?")
    else:
        print(f"Hello {user},thank you for logging in again.")
